package com.example.kindergarten.dto

import org.hibernate.validator.constraints.Length
import javax.validation.constraints.NotBlank
import javax.validation.constraints.Pattern

class RegisterDto(
    @field: NotBlank(message = "username不能为空")
    @field: Length(message = "用户名长度必须大于2且小于20", min = 2, max = 20)
    var username: String,

    @field: NotBlank(message = "password不能为空")
    var password: String,

    @field: NotBlank(message = "phone不能为空")
    @field: Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    var phone: String,



    ) : IdRequiredDto()
